package base.exa12;

public class Human4 {
    public static void main(String[] args) {
        Man4 you = new Man4();
        you.action();
        System.out.println(you.money);

    }
}

class People4{
    private int leg = 2;
    int money;
    void action(){
        leg = 5;
        money = 10;
        System.out.println("I am a People");
    }
}

class Man4 extends People4{
    int height;
    int money = 5;

    /**
     * 重写从父类继承的方法
     */
    void action(){
        money = 15;
        System.out.println("I am a Man");
    }
}